-
Notifications
You must be signed in to change notification settings - Fork 1k
Python: [BREAKING] fix(workflows): Rename WorkflowOutputEvent.source_executor_id to executor_id #3166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…utor_id for API consistency
Python Test Coverage Report •
Python Unit Test Overview
|
||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR renames WorkflowOutputEvent.source_executor_id to executor_id for consistency with other executor-related events (ExecutorInvokedEvent, ExecutorCompletedEvent, ExecutorFailedEvent) which all use executor_id. This breaking change provides uniform attribute access across all executor-related events.
Changes:
- Renamed the
source_executor_idparameter and attribute toexecutor_idinWorkflowOutputEvent - Updated all instantiation sites, pattern matching, and attribute access throughout the codebase
- Updated TypeScript type definitions and test files to reflect the change
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
python/packages/core/agent_framework/_workflows/_events.py |
Changed WorkflowOutputEvent constructor parameter and attribute from source_executor_id to executor_id, updated __repr__ method |
python/packages/core/agent_framework/_workflows/_workflow_context.py |
Updated yield_output method to instantiate WorkflowOutputEvent with executor_id parameter |
python/packages/core/agent_framework/_workflows/_agent.py |
Updated pattern matching to use executor_id instead of source_executor_id, updated all references within the match case |
python/packages/devui/agent_framework_devui/_mapper.py |
Changed getattr call to retrieve executor_id instead of source_executor_id, updated logging statement |
python/packages/devui/tests/test_mapper.py |
Updated test instantiations to use executor_id parameter |
python/packages/devui/frontend/src/types/agent-framework.ts |
Updated WorkflowOutputEvent interface to use executor_id property, updated comment on base WorkflowEvent interface |
python/samples/getting_started/workflows/control-flow/sequential_streaming.py |
Updated sample output comment to show executor_id instead of source_executor_id |
Motivation and Context
WorkflowOutputEventusedsource_executor_idwhileExecutorEventsubclasses (ExecutorInvokedEvent,ExecutorCompletedEvent,ExecutorFailedEvent) usedexecutor_id. This inconsistency caused confusion when iterating over workflow events:This PR renames
WorkflowOutputEvent.source_executor_idtoexecutor_idfor uniform attribute access across all executor-related events.Before:
After:
Caution
WorkflowOutputEvent.source_executor_id→WorkflowOutputEvent.executor_idWorkflowOutputEvent(data=..., executor_id=...)Description
Contribution Checklist